<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <title>教师列表</title>
        <style type="text/css">
            h3 { text-align: center ; }
            table {
                width: 80% ;
                margin: auto ;
                border: 1px solid blue ;
                border-collapse: collapse ;
            }
            th,
            td {
                border: 1px solid blue ;
            }
            div{ border: 1px solid blue ; }
        </style>
    </head>
    <body>

        <h3>教师列表</h3>

        <table>
            <tr>
                <th>工号</th>
                <th>姓名</th>
                <th>性别</th>
                <th>婚否</th>
                <th colspan="2">操作</th>
            </tr>
            {% for t in teachers %}
            <tr>
                <td>{{ t.id }}</td>
                <td>{{ t.name }}</td>
                <td>{{ t.gender }}</td>
                <td>{{ t.married }}</td>
                <td> <a href="/teacher/remove/{{t.id}}">删除</a> </td>
                <td> <a href="/teacher/edit/{{t.id}}">编辑</a> </td>
            </tr>
            {% else %}
            <tr>
                <td>暂无数据</td>
            </tr>
            {% endfor %}
        </table>

        <hr>

        <div>{{ message }}</div>

        <div>{{ message | length }}</div>

        <div>{{ message | safe }}</div>

    </body>
</html>